package com.company.oa.workflow.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.company.oa.workflow.dto.ApprovalDTO;
import com.company.oa.workflow.entity.ApprovalRecord;

import java.util.Map;

public interface ApprovalService {
    
    /**
     * 获取待办任务
     */
    IPage<Map<String, Object>> getTodoTasks(int page, int size, Long userId, String businessType);
    
    /**
     * 获取已办任务
     */
    IPage<ApprovalRecord> getDoneTasks(int page, int size, Long userId, String businessType);
    
    /**
     * 审批任务
     */
    boolean approveTask(ApprovalDTO approvalDTO, Long userId);
    
    /**
     * 获取审批记录
     */
    IPage<ApprovalRecord> getApprovalRecords(int page, int size, String processInstanceId);
    
    /**
     * 获取流程图
     */
    String getProcessDiagram(String processInstanceId);
    
    /**
     * 获取任务详情
     */
    Map<String, Object> getTaskDetail(String taskId);
} 